<?php //$Rev:: 55         $ // DO NOT REMOVE

class UPDATE_BUDDY2 extends Parser
{
    public function parse($args, $obj)
    {
        $data = array();
        @list($data['screenname'],
              $data['online'],
              $data['evil'],
              $data['signon'],
              $data['idle'],
              $data['class'],
              $data['unknown']) = explode(':', $args, 7);
        
        $data['screenname'] = $obj->core->aim_normalize($data['screenname']);
        $data['online']     = ($data['online'] == 'T') ? true : false;
        $data['class']      = $obj->core->buddy->aim_get_user_class($data['class']);

        // copy the info to the buddylist
        foreach ($obj->core->buddylist as $k => $v) {
            if ($v == $data['screenname']) {
                $obj->core->buddylist[$k] = $data;
            }
        }

        //print_r($obj->core->buddylist);
        
        // issue a sign on/off message to the console.
        $obj->core->aim_debug($data['screenname'] . ' has just signed ' . (($data['online'])?'on':'off'), AIM_RECV);
        
    }
}

?>